//Adventurer Card
#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>

int main(int argc, char const *argv[])
{
	int player;
	struct gameState state;
	int handPos, hand_count, actions;
	int i, j;
	for(i = 0; i < 2000; i++){
		for (j = 0; j < sizeof(struct gameState); j++) {
			((char*)&state)[i] = floor(Random() * 256);
		}
		player = rand() % 5;
		state.handCount[player] = rand() % MAX_HAND;
		hand_count = state.handCount[player];
		handPos = rand() % state.handCount[player];
		actions = rand() % 10;
		state.numActions = actions;
		for(j = 0; j < state.handCount[player]; j++){
			if(j == handPos){
				state.hand[player][j] = 14;
			}else {
				state.hand[player][j] = rand() % 27;
			}
		}
		villageCard(player, $state, handPos);
		if(state.handCount[player] == hand_count + 1){// +2 cards, -1 village card
			printf("Pass: Hand Count\n");
		}else{
			printf("Fail: Hand Count. Had %d, have %d\n", hand_count, state.handCount[player]);
		}
		if(state.numActions == actions + 2){
			printf("Pass: Action Count\n");
		} else {
			printf("Fail: Action Count. Had %d, have %d\n", actions, state.numActions);
		}
	}


	return 0;
}